package com.speedricemanager.other.base;

import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Action1;
import rx.schedulers.Schedulers;


public class BaseNet {
    private Action1 action;
    public BaseNet(Action1 action){
        this.action=action;
    }

    protected   <T> void Observable1(Observable.OnSubscribe<T> onSubscribe){
        Observable.create(onSubscribe).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(action);
    }

}
